const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  // 设置为相对路径，避免打包后找不到静态文件
  publicPath: './',
  devServer: {
    port:8080,
    historyApiFallback: true, // 解决Vue Router history模式刷新404问题
    proxy: {
        '/api': {
            // target: 'http://39.104.76.105:9090', 
            target: 'http://localhost:9090', 
            changeOrigin: true,
            ws: true,
            pathRewrite: {
                '^/api': ''
            }
        }
    },
},
})
